<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SHOP 管理中心 - 添加分类 </title>
<meta name="robots" content="noindex, nofollow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="application/views/admin/styles/general.css" rel="stylesheet" type="text/css" />
<link href="application/views/admin/styles/main.css" rel="stylesheet" type="text/css" />
</head>
<body>

<h1>
<span class="action-span"><a href="index.php?p=admin&c=category&a=index">商品分类</a></span>
<span class="action-span1"><a href="index.php?act=main">SHOP 管理中心</a> </span><span id="search_id" class="action-span1"> - 添加分类 </span>
<div style="clear:both"></div>
</h1>
<!-- start add new category form -->
<div class="main-div">
  <form action="index.php?p=admin&c=category&a=update" method="post" name="theForm" enctype="multipart/form-data" onsubmit="return validate()">
	 <table width="100%" id="general-table">
		<tbody>
			<tr>
				<td class="label">分类名称:</td>
				<td><input type="text" name="cat_name" maxlength="20" value="<?php echo $cat['cat_name'];?>" size="27"> <font color="red">*</font></td>
			</tr>
			<tr>
				<td class="label">上级分类:</td>
				<td>
					<select name="parent_id">
						<option value="0">顶级分类</option>
						<?php foreach ($cats as $v):?>
						<option value="<?php echo $v['cat_id'];?>"
							<?php echo $cat['parent_id'] == $v['cat_id'] ? "selected='selected'" : "" ?>
						>
						<?php echo str_repeat("&nbsp;&nbsp;", $v['level']);?>
						<?php echo $v['cat_name'];?></option>
						<?php endforeach;?>
					</select>
				</td>
			</tr>

			<tr id="measure_unit">
				<td class="label">数量单位:</td>
				<td><input type="text" name="unit" value="<?php echo $cat['unit'];?>" size="12"></td>
			</tr>
			<tr>
				<td class="label">排序:</td>
				<td><input type="text" name="sort_order" value="<?php echo $cat['sort_order'];?>" size="15"></td>
			</tr>

			<tr>
				<td class="label">是否显示:</td>
				<td><input type="radio" name="is_show" value="1"  <?php echo $cat['is_show'] == 1 ?  "checked='checked'" : ""?> > 是
				<input type="radio" name="is_show" value="0" <?php echo $cat['is_show'] == 0 ?  "checked='checked'" : ""?>> 否  </td>
			</tr>
			
      <tr>
        <td class="label">分类描述:</td>
        <td>
          <textarea name="cat_desc" rows="6" cols="48"><?php echo $cat['cat_desc'];?></textarea>
        </td>
      </tr>
      </tbody></table>
      <div class="button-div">
        <input type="submit" value=" 确定 ">
        <input type="reset" value=" 重置 ">
      </div>
    <input type="hidden" name="act" value="insert">
    <input type="hidden" name="old_cat_name" value="">
    <input type="hidden" name="cat_id" value="<?php echo $cat['cat_id'];?>">
  </form>
</div>



<div id="footer">
	版权所有 &copy; HUIPHP- 
</div>

</div>

</body>
</html>